package com.haople.sso.core.authentication;

import com.haople.sso.core.vo.Ticket;

/**
 * 根据票据验证授权
 * @author Administrator
 *
 */
public interface TicketAuthorization {


    /**
     * 票据验证
     * @param ticket
     * @param userId
     * @return
     */
    boolean authorization(Ticket ticket) throws Exception;
    
    /**
     * 保存票据
     * @param ticket
     * @throws Exception 
     */
    boolean save(Ticket ticket) throws Exception;
    
    
    /**
     * 根据用户key 获取票据
     * @param userId
     * @return
     */
    Ticket  get(String userKey)  throws Exception;
}
